package org.example.syn;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

import java.util.HashMap;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author Yyming
 * @version 10.0
 * Created by Yyming on 2021/3/1
 */
public class ConcurrentHashMapTest {
    public static void main(String[] args) {
        ConcurrentHashMap<String,String> concurrentHashMap = new ConcurrentHashMap<>();
        concurrentHashMap.put("1","2");
        concurrentHashMap.get("");
        HashMap<String, String> hashMap = new HashMap<>();
        hashMap.put("1","2");


        System.out.println(Runtime.getRuntime().availableProcessors());
        System.out.println(32 >>> 3);


        JSONArray jsonArray = new JSONArray();
        JSONObject jsonObject = new JSONObject();
        jsonArray.add(jsonObject);
        jsonObject.put("time","1200,300");
        jsonObject.put("total","10000,10");
        jsonObject.put("complex","2,1,35");
        jsonObject = new JSONObject();
        jsonArray.add(jsonObject);
        jsonObject.put("time","1200,300");
        jsonObject.put("total","10000,10");
        jsonObject.put("complex","2,1,35");

        JSONObject all = new JSONObject();
        all.put("sql",jsonArray);

        all.put("lastMod",System.currentTimeMillis());

        System.out.println(all.toString());
    }
}
